//
//  EFAPjtUserSelDevTCell.m
//  efairy
//
//  Created by XiangDongMBP on 2017/8/16.
//  Copyright © 2017年 East. All rights reserved.
//

#import "EFAPjtUserSelDevTCell.h"
#import "EFAModel.h"

@implementation EFAPjtUserSelDevTCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    [self.selBtn addTarget:self action:@selector(selBtnTapped:) forControlEvents:UIControlEventTouchUpInside];
    [self.selBtn setUserInteractionEnabled:NO];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)selBtnTapped:(UIButton *)btn {
    if ([self.delegate respondsToSelector:@selector(pjtUserSelDevTCell:selBtnTapped:)]) {
        [self.delegate pjtUserSelDevTCell:self selBtnTapped:btn];
    }
}

- (void)configViewWithDevListItem:(EFADeviceListItem *)item {
    self.titleLabel.text = item.efairydevice_name;
    self.subTitleLabel.text = [NSString stringWithFormat:@"UUID:%@", item.efairydevice_uuid];
    self.selBtn.selected = item.efairydevice_user_ownned;
}

@end

